package com.yphone.base.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class MySharepreferenceUtil {
    public static SharedPreferences getSharedPreferences(Context context, String spName) {
        return context.getSharedPreferences(spName, 0);
    }

    public static String getSharePreString(Context context, String spName, String nodeName, String value) {
        return getSharedPreferences(context, spName).getString(nodeName, value);
    }

    public static void putSharePreStr(Context context, String spName, String nodeName, String value) {
        getSharedPreferences(context, spName).edit().putString(nodeName, value).apply();
    }



}
